package com.operation;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import sun.misc.BASE64Encoder;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;

public class Audit {
	public void loginAudit() throws Exception{
		
		String user="";
		String encode = new BASE64Encoder().encode(user.getBytes());
		user = URLEncoder.encode(encode,"utf-8");
		
		String acip="";
		
		String url = "http://"+acip+":85/cgi-bin/caauth.cgi?ui=web&opr=logon&chk_cookie=0&info="+user;
		HttpSendUrl hsu = new HttpSendUrl();
		hsu.getSendRequest(url, "", "GET",3000);
	}
	public void loginOutAudit() throws Exception{
		String user="";
		String encode = new BASE64Encoder().encode(user.getBytes());
		user = URLEncoder.encode(encode,"utf-8");
		
		String acip="";
		
		String url = "http://"+acip+":85/cgi-bin/caauth.cgi?ui=web&opr=logout&chk_cookie=0&info="+user;
		HttpSendUrl hsu = new HttpSendUrl();
		hsu.getSendRequest(url, "", "GET",3000);
	}
}
